<!--
 * @LastEditors: yuSeen
 * @LastEditTime: 2021-11-18 11:57:35
 * 天凉好个秋
-->
<template>
  <div>
    <AttrTab v-model="tabType" />
    <!--基础设置-->
    <div v-show="tabType == 1">
      <div class="att-con-box">
        <div class="att-con-pd">
          <setRadioValueAttr title="logo图标" :attr="attr.attrs.logo" ckey="imgType" :list="logoList" />
          <SetImgAttr
            :moduleData="attr.attrs.logo"
            small
            title="上传LOGO"
            size="75 * 60"
            v-if="attr.attrs.logo.imgType == 3"
          />
          <div class="item">
            <setTextAttr :textAttr="attr.attrs.inputText" />
          </div>
        </div>
      </div>
    </div>
    <!--样式设置-->
    <div class="att-con-box" v-show="tabType == 2">
      <div class="att-con-pd">
        <setModuleBaseAttr :moduleBase="attr.attrs" defBgColor="#718093" />
        <setColorAttr title="全局主题颜色" :attr="attr.attrs" ckey="themeColor" defColor="#718093" @change="themeChange" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "NavbarAttr",
  props: ["attr"],
  data() {
    return {
      tabType: 1,
      logoList: [
        { name: '默认', value: 1 },
        { name: '隐藏', value: 2 },
        { name: '自定义', value: 3 }
      ]
    };
  },
  methods: {
    // 主题色切换
    themeChange(e) {
      this.attr.attrs.bgColor = e
    }
  }
};
</script>

<style>
.tit {
  white-space: nowrap !important;
}
</style>
